package com.mauroleon.base.service;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

public interface MongoBaseService<T extends Object, ID extends Serializable> {

	public abstract List<T> findAll();

	public abstract List<T> findAll(Sort arg0);

	public abstract List<T> save(Iterable<? extends T> arg0);

	public abstract Page<T> findAll(Pageable pageable);

	public abstract T save(T entity);

	public abstract T findOne(ID id);

	public abstract boolean exists(ID id);

	public abstract long count();

	public abstract void delete(ID id);

	public abstract void delete(T entity);

	public abstract void delete(Iterable<? extends T> entities);

	public abstract void deleteAll();
}
